# $Id$
# Maintainer: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgname=whois
pkgver=5.2.18
pkgrel=1
pkgdesc="The whois client by Marco d'Itri"
arch=('i686' 'x86_64')
url="http://www.linux.it/~md/software/"
license=('GPL')
depends=('libidn')
makedepends=('perl')
backup=('etc/whois.conf')
source=("http://ftp.debian.org/debian/pool/main/w/whois/${pkgname}_${pkgver}.tar.xz")
sha256sums=('c35d0d26aff37107c244a8ad54fd42e497ec0b90f76309e9beb7078b827c97d5')

build() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  make prefix=/usr \
       CFLAGS="$CFLAGS $CPPFLAGS" \
       CONFIG_FILE=/etc/whois.conf \
       HAVE_LIBIDN=1 \
       HAVE_ICONV=1
}

package() {
  cd "${srcdir}/${pkgname}-${pkgver}"

  make prefix=/usr BASEDIR="${pkgdir}" install-whois
  install -D -m644 whois.conf "${pkgdir}/etc/whois.conf"
}
